<?php
session_start();
include 'connect.php';



$sql = "select * from game where 1=1";
$con=isset($_GET['con'])?$_GET['con']:'';

$gid=$_GET['gid'];

//$content=isset($_GET['content'])?$_GET['content']:'';

//if ($content=='sousuo'){
$sql.=" and gamename like '%$con%'";
//$sql.=" and title like '%$con%' or content like '%$con%'";
//}
$restle = mysqli_query($link,$sql);
$seachGame=[];

while ($row=mysqli_fetch_assoc($restle)){
    $seachGame[$row['gid']]['gid']=$row['gid'];
    $seachGame[$row['gid']]['gimgid']=$row['gimgid'];
    $seachGame[$row['gid']]['tid']=$row['tid'];
    $seachGame[$row['gid']]['dipeiid']=$row['dipeiid'];
    $seachGame[$row['gid']]['gaopeiid']=$row['gaopeiid'];
    $seachGame[$row['gid']]['gamename']=$row['gamename'];
    $seachGame[$row['gid']]['gamejs']=$row['gamejs'];
    $seachGame[$row['gid']]['gamejg']=$row['gamejg'];
    $seachGame[$row['gid']]['gamegs']=$row['gamegs'];
    $seachGame[$row['gid']]['gametime']=$row['gametime'];
    $seachGame[$row['gid']]['redu']=$row['redu'];
    $seachGame[$row['gid']]['xiaoliang']=$row['xiaoliang'];
    $seachGame[$row['gid']]['leixing']=$row['leixing'];
}
echo json_encode($seachGame);